package com.midea.ai.air.ui.home.data;

import java.util.List;

/**
 * Created by ouyangdi on 2016/4/7.
 * 情景按钮数据模型
 */
public class SceneModel {
    private int mResIdIcon;         //图标
    private String mStrScene;       //情景
    private List<ParaValueModel> mListParas; //参数与参数值的映射
    private String mStrParas;//参数值的字符串表示

    public int getResIdIcon() {
        return mResIdIcon;
    }

    public String getStrScene() {
        return mStrScene;
    }

    public SceneModel(int resIdIcon, String strScene, List<ParaValueModel> listParas) {
        mResIdIcon = resIdIcon;
        mStrScene = strScene;
        mListParas = listParas;
        initStrParas();
    }

    public List<ParaValueModel> getListParas() {
        return mListParas;
    }

    private String initStrParas() {
        mStrParas = "";
        for(int i=0; i< mListParas.size(); i++) {
            if(i!=0) {
                mStrParas+=", ";
            }
            mStrParas += mListParas.get(i).getPara() + mListParas.get(i).getValue();
        }
        return mStrParas;
    }

    public String getStrParas() {
        return mStrParas;
    }
}
